import time as t

#练习1
t0 = t.perf_counter()
for i in range(10000):
    print(i)
t1 = t.perf_counter()
print("该程序运行时长为：",t1 - t0)

#练习2
t2 = (2021,4,17,0,0,0,0,0,0)#元组
t3 = t.mktime(t2)#浮点数时间
print(t3)
t4 = t.localtime(t3)#当前时间，元组，9个元素
print(t4)

dic = {
    0: "周一",
    1: "周二",
    2: "周三",
    3: "周四",
    4: "周五",
    5: "周六",
    6: "周日"
}
z = t4[6]
d = t4[7]
print('今天是',dic[z],'是今年的第',d,'天')